import request from '@/utils/request';
import type { HttpResult } from '@/api';
import type { EditSysModuleMenu, SysModuleMenu } from './model';

// 编辑
export const edit = async (data: EditSysModuleMenu): Promise<HttpResult<string>> => {
  const res = await request.post<HttpResult<string>>(
    '/system/sysModuleMenu/edit',
    data,
  );
  return res.data;
};

// 查询
export const queryList = async (id: string): Promise<HttpResult<string[]>> => {
  const res = await request.post<HttpResult<string[]>>(
    '/system/sysModuleMenu/queryList',
    { moduleId: id }
  );
  return res.data;
};
